\documentclass[a4paper]{article}
\usepackage{german}
\usepackage[utf8]{inputenc}

\usepackage{pgfplots}
\usepackage{pgfplots.assert}

\usetikzlibrary{intersections}
\usepgflibrary{fillbetween}
\usetikzlibrary{pgfplots.decorations.softclip}

\def\showPathSegment#1{%
	\begin{tikzpicture}[trim left={(0,0)}]
		\draw[help lines] \pgfextra \pgfsetpathandBB\inputValue\endpgfextra;

		\pgfsetcolor{blue}
		\expandafter\pgfsetpath\csname #1\endcsname
		\expandafter\pgfsetpathandBB\csname #1\endcsname
		\pgfusepath{stroke}
	\end{tikzpicture}
}

\begin{document}

	\makeatletter

	\def\inputValue{%
		\pgfsyssoftpath@movetotoken {56.90549pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {142.26372pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {170.71646pt}{0.0pt}%
	}

\long\def\TESTCASE{%
%\tracingcommands=2\tracingmacros=2
	{
	\pgfpathcomputesoftclippath{\inputValue}{\clippath}
	\message{OUTPUT: \meaning\pgfretval^^J}%

	\begin{tabular}{ll}
	INPUT: & \showPathSegment{inputValue}\\
	CLIP: & 	\showPathSegment{clippath}\\
	RESULT : & \showPathSegment{pgfretval}\\
	\end{tabular}

	%\pgfplotsassertequalstok{\meaning\expected}{\meaning\pgfretval}{expected value for  was wrong}
	}
}%
\section{clip path completely INSIDE}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {80.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {80.00732pt}{23.09595pt}%
		\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {130.0119pt}{16.18913pt}%
	}
	\TESTCASE

\section{start of clip path inside}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {80.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {200.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {200.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {80.00732pt}{23.09595pt}%
		\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {142.26372pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {170.71646pt}{0.0pt}%
	}
	\TESTCASE

	\section{end of clip path inside}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {10.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {10.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {10.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {56.90549pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {130.0119pt}{16.18913pt}%
	}
	\TESTCASE

	\section{complicated overlap}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {80.0pt}{15.0pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{-15pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{-15pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{15pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{15pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {98.8214pt}{15.00137pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {128.82414pt}{15.00137pt}%
	}
	\TESTCASE

	\section{complicated overlap (2)}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {80.0pt}{15.0pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{-15pt}%
		\pgfsyssoftpath@linetotoken {200.0pt}{-15pt}%
		\pgfsyssoftpath@linetotoken {200.0pt}{15pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{15pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {98.8214pt}{15.00137pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {128.82414pt}{15.00137pt}%
		\pgfsyssoftpath@movetotoken {155.73279pt}{15.00137pt}%
		\pgfsyssoftpath@linetotoken {170.71646pt}{0.0pt}%
	}
	\TESTCASE


	\section{Longer input path}
	\def\inputValue{%
\pgfsyssoftpath@movetotoken {12.5pt}{135.00061pt}\pgfsyssoftpath@linetotoken {69.79164pt}{26.8852pt}\pgfsyssoftpath@linetotoken {74.99998pt}{26.12915pt}\pgfsyssoftpath@linetotoken {80.20831pt}{26.8852pt}\pgfsyssoftpath@linetotoken {137.49997pt}{135.00053pt}%
	}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {75.0pt}{-17.41943pt}\pgfsyssoftpath@linetotoken {75.0pt}{200.32349pt}\pgfsyssoftpath@linetotoken {175.0pt}{200.32349pt}\pgfsyssoftpath@linetotoken {175.0pt}{-17.41943pt}\pgfsyssoftpath@closepathtoken {75.0pt}{-17.41943pt}%
	}
	\def\expected{%
		\pgfsyssoftpath@movetotoken {75.01404pt}{26.13422pt}\pgfsyssoftpath@linetotoken {74.99998pt}{26.12915pt}\pgfsyssoftpath@linetotoken {80.20831pt}{26.8852pt}\pgfsyssoftpath@linetotoken {137.49997pt}{135.00053pt}%
	}%
	\TESTCASE


\section{clip path completely INSIDE; plot dir=-}
	\def\inputValue{%
		\pgfsyssoftpath@movetotoken {170.71646pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {142.26372pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}%
		\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}%
		\pgfsyssoftpath@linetotoken {56.90549pt}{0.0pt}%
	}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {80.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {130.0119pt}{16.18913pt}\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}\pgfsyssoftpath@linetotoken {80.00732pt}{23.09595pt}%
	}
	\TESTCASE

\section{start of clip path inside; plot dir=-}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {80.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {200.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {200.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {80.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {170.71646pt}{0.0pt}\pgfsyssoftpath@linetotoken {142.26372pt}{28.45274pt}\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}\pgfsyssoftpath@linetotoken {80.00732pt}{23.09595pt}%
	}
	\TESTCASE

	\section{end of clip path inside; plot dir=-}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {10.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {10.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {10.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {130.0119pt}{16.18913pt}\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}\pgfsyssoftpath@linetotoken {56.90549pt}{0.0pt}%
	}
	\TESTCASE

\section{clip path and input path disjoint}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {180.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {180.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {280.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {280.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {180.0pt}{40pt}%
	}%
	\def\expected{%
	}
	\TESTCASE

	\section{end of clip path inside; plot dir=-}
	\def\clippath{%
		\pgfsyssoftpath@movetotoken {10.0pt}{40.0pt}%
		\pgfsyssoftpath@linetotoken {10.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{-40pt}%
		\pgfsyssoftpath@linetotoken {130.0pt}{40pt}%
		\pgfsyssoftpath@linetotoken {10.0pt}{40pt}%
	}%
	\def\expected{%
		\pgfsyssoftpath@movetotoken {130.0119pt}{16.18913pt}\pgfsyssoftpath@linetotoken {113.81097pt}{0.0pt}\pgfsyssoftpath@linetotoken {85.35823pt}{28.45274pt}\pgfsyssoftpath@linetotoken {56.90549pt}{0.0pt}%
	}
	\TESTCASE
\end{document}

